import logging
import yagmail
def loc_set():
    logging.basicConfig(level=logging.DEBUG,filename='log.txt',format="%(asctime)s -> %(message)s -> %(levelname)s",filemode='a')

def send_mail(filename):
    mail=yagmail.SMTP(user='3525402708@qq.com',password='etirovpdxbordafj',host='smtp.qq.com')
    mail.send(to='3525402708@qq.com',subject='测试报告',contents='测试报告请查看',attachments=filename)